class StringUtil {
	public constructor() {
	}
	public static sdkVersionCompare(sdkVer1:string,sdkVer2:string): boolean{
		if(!sdkVer1 || !sdkVer2){
            return false;
        }
        var skdVer1Arr:Array<any> = sdkVer1.split(".");
        var skdVer2Arr:Array<any> = sdkVer2.split(".");
        // 让两个数组的长度都相等，也就是标准的版本号中点的位数一致
        if(skdVer1Arr.length > skdVer2Arr.length){
            for(var i=0;i<(skdVer1Arr.length-skdVer2Arr.length);i++){
                skdVer2Arr.push("0");
            }
        }else if(skdVer1Arr.length < skdVer2Arr.length){
            for(var i=0;i<(skdVer2Arr.length-skdVer1Arr.length);i++){
                skdVer1Arr.push("0");
            }
        }
        for(var i=0;i<skdVer1Arr.length;i++){
            var ver1Text = skdVer1Arr[i];
            var ver2Text = skdVer2Arr[i];
            // 让版本号的每一个.之间的位数长度都一样
            if(ver1Text.length > ver2Text.length){
                for(var j=0;j<(ver1Text.length-ver2Text.length);j++){
                    ver2Text = "0"+ver2Text;
                }
            }else if(ver1Text.length < ver2Text.length){
                for(var j=0;j<(ver2Text.length-ver1Text.length);j++){
                    ver1Text = "0"+ver1Text;
                }
            }
            skdVer1Arr[i] = ver1Text;
            skdVer2Arr[i] = ver2Text;
        }
        var sdkVer1Num = skdVer1Arr.join("");
        var sdkVer2Num = skdVer2Arr.join("");
        var result = parseInt(sdkVer1Num)>=parseInt(sdkVer2Num);
        return result;
	}
}